package com.crealth.db;

import java.util.List;

import com.crealth.manager.MybatisManager;
import com.crealth.model.LendingAgencyModel;

public class LendingAgencyDb {

	public static Integer insertLendingAgency(LendingAgencyModel lendingAgency) {
		Integer res = MybatisManager.lendingAgencyMapper.insertLendingAgency(lendingAgency);
		MybatisManager.commit();
		
		return res;
	}
    
	public static List<LendingAgencyModel> selectAllLendingAgency() {
		List<LendingAgencyModel> agencyls = MybatisManager.lendingAgencyMapper.selectAllLendingAgency();
		
		return agencyls;
	}
    
	public static Integer updateLendingAgency(LendingAgencyModel lendingAgency) {
		Integer res = MybatisManager.lendingAgencyMapper.updateLendingAgency(lendingAgency);
		MybatisManager.commit();
		
		return res;
	}
	
	public static Integer deleteLendingAgencyByID(int id) {
		Integer res = MybatisManager.lendingAgencyMapper.deleteLendingAgencyByID(id);
		MybatisManager.commit();
		
		return res;
	}
	
}
